home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 22.8 KB | 708 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWSemInt.cpp
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWSEMINT_H
- #include "FWSemInt.h"
- #endif
-
- // ----- Framework Includes -----
-
- #ifndef FWACQSCR_H
- #include "FWAcqScr.h"
- #endif
-
- #ifndef FWEXTMGR_H
- #include "FWExtMgr.h"
- #endif
-
- #ifndef FWPART_H
- #include "FWPart.h"
- #endif
-
- #ifndef PRSIGLUE_H
- #include "PRSIGlue.h"
- #endif
-
- #ifndef FWAPLEVT_H
- #include "FWAplEvt.h"
- #endif
-
- #ifndef FWDSCOPR_H
- #include "FWDscOpr.h"
- #endif
-
- #ifndef FWSCPCAL_H
- #include "FWScpCal.h"
- #endif
-
- #ifndef FWSCPCOL_H
- #include "FWScpCol.h"
- #endif
-
- #ifndef FWSCPTBL_H
- #include "FWScptbl.h"
- #endif
-
- #ifndef FWPRTSCP_H
- #include "FWPrtScp.h"
- #endif
-
- #ifndef FWSCPPRP_H
- #include "FWScpPrp.h"
- #endif
-
- #ifndef FWITERS_H
- #include "FWIters.h"
- #endif
-
- #ifndef FWCONTXT_H
- #include "FWContxt.h"
- #endif
-
- #ifndef FWEVENTU_H
- #include "FWEventU.h"
- #endif
-
- #ifndef FWINK_H
- #include "FWInk.h"
- #endif
-
- #ifndef FWOVLSHP_H
- #include "FWOvlShp.h"
- #endif
-
- #ifndef SOM_FW_OSemanticInterface_xh
- #include "SLSemInt.xh"
- #endif
-
- #ifndef FWSOMENV_H
- #include "FWSOMEnv.h"
- #endif
-
- #ifndef FWSESION_H
- #include "FWSesion.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef SOM_Module_OpenDoc_StandardExtensions_defined
- #include <StdExts.xh>
- #endif
-
- #ifndef SOM_Module_OpenDoc_ODRegistry_defined
- #include <ODRgstry.xh>
- #endif
-
- #ifndef SOM_ODNameResolver_xh
- #include <NamRslvr.xh>
- #endif
-
- #ifndef SOM_ODObjectSpec_xh
- #include <ODObjSpc.xh>
- #endif
-
- #ifndef SOM_ODOSLToken_xh
- #include <ODOSLTkn.xh>
- #endif
-
- // ----- Macintosh Includes -----
-
- #ifndef __ASREGISTRY__
- #include <ASRegistry.h>
- #endif
-
- //========================================================================================
- // Runtime Information
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment fwsemevt
- #endif
-
- FW_DEFINE_AUTO(FW_CSemanticInterface)
-
- //========================================================================================
- // class FW_CSemanticInterface
- //========================================================================================
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::FW_CSemanticInterface
- //---------------------------------------------------------------------------------------
-
- FW_CSemanticInterface::FW_CSemanticInterface(Environment* ev, FW_CPart* part) :
- fDefaultContainer(FW_DYNAMIC_CAST(FW_MPartScriptable, part)),
- fPart(part),
- fOSLFlags(kAEIDoMinimum),
- fUsingPredispatchProc(FALSE)
- {
- FW_UNUSED(ev);
-
- FW_END_CONSTRUCTOR
-
- // OpenDoc releases 1.0 - 1.04 (possibly later) have a bug that prevents marking
- // from working correctly. The bug causes OpenDoc to look at the OSL flags of
- // the part's containing part when determining whether or not a part marks. This
- // means that if a part says it does marking, OpenDoc will treat it as if it does
- // not, but will treat all parts contained by that part as if they do.
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::~FW_CSemanticInterface
- //---------------------------------------------------------------------------------------
-
- FW_CSemanticInterface::~FW_CSemanticInterface()
- {
- FW_START_DESTRUCTOR
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CreateSOMInterface
- //---------------------------------------------------------------------------------------
-
- FW_OSemanticInterface* FW_CSemanticInterface::CreateSOMInterface(Environment *ev,
- FW_CPart *part,
- const char *name,
- void* refCon)
- {
- FW_UNUSED(name);
- FW_UNUSED(refCon);
- FW_OSemanticInterface* semInt = new FW_OSemanticInterface;
- semInt->InitODFSemanticInterface(ev, part->GetODPart(ev), FW_CSession::GetODSession(ev), this, FW_PrivGetSemanticInterfaceGlue());
-
- semInt->SetOSLSupportFlags(ev, fOSLFlags);
- semInt->UsingPredispatchProc(ev, fUsingPredispatchProc);
-
- return semInt;
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::AcquireSOMInterface
- //---------------------------------------------------------------------------------------
-
- FW_OSemanticInterface* FW_CSemanticInterface::AcquireSOMInterface(Environment* ev)
- {
- return (FW_OSemanticInterface*)fPart->GetExtensionManager(ev)->AcquireExtension(ev, kODExtSemanticInterface, FW_kDontCreateExtension);
- }
-
- //========================================================================================
- // Begin Callbacks
- //========================================================================================
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallEventHandler
- //---------------------------------------------------------------------------------------
-
- void FW_CSemanticInterface::CallEventHandler(Environment* ev,
- FW_CAppleEvent& event,
- FW_CAppleEvent& reply)
- {
- // FW_DebugIdentifyPart(ev, fPart->GetLastActiveFrame(ev), FW_kRGBGreen);
-
- FW_CAcquiredScriptable targetObject = AcquireTargetObject(ev, event);
-
- AEKeyword eventClass = event.GetEventClass();
- AEKeyword eventID = event.GetEventID();
-
- targetObject->HandleSemanticEvent(ev, fPart, eventClass, eventID, event, reply);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallCoercionHandler
- //---------------------------------------------------------------------------------------
-
- void FW_CSemanticInterface::CallCoercionHandler(Environment* ev,
- const FW_CDesc& theDesc,
- ODDescType toType,
- FW_CDesc& theResult)
- {
- FW_UNUSED(ev);
- FW_Handled handled = FW_CDescCoercionCallbacks::InvokeHandler(theDesc, toType, theResult);
- if (handled == FW_kNotHandled)
- FW_Failure(errAECoercionFail);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallPredispatchProc
- //---------------------------------------------------------------------------------------
-
- void FW_CSemanticInterface::CallPredispatchProc(Environment* ev,
- FW_CAppleEvent& event,
- FW_CAppleEvent& reply)
- {
- FW_UNUSED(ev);
- FW_UNUSED(event);
- FW_UNUSED(reply);
- FW_Failure(errAEEventNotHandled);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallObjectAccessor
- //---------------------------------------------------------------------------------------
-
- void FW_CSemanticInterface::CallObjectAccessor(Environment* ev,
- ODDescType desiredClass,
- ODOSLToken* container,
- ODDescType containerClass,
- ODDescType form,
- FW_CDesc& selectionData,
- ODOSLToken* value)
- {
- // FW_DebugIdentifyPart(ev, fPart->GetLastActiveFrame(ev), FW_kRGBBlue);
-
- FW_CDesc containedObjectToken(GetDescFromToken(ev, value));
- FW_CDesc containerToken(GetDescFromToken(ev, container));
- FW_CAcquiredScriptable acquiredObject;
-
- // OpenDoc 1.0 doesn't handle OSLSupportFlags correctly.
- // Instead of respecting our request for object marking,
- // we get a container token here that is a list built
- // by the OD OSL. For now, we'll simulate marking by
- // building generating a collection of marked objects ourselves.
-
- if (containerToken.IsList() && desiredClass == cProperty)
- {
- ODDescType whichProperty;
-
- selectionData >> whichProperty;
- acquiredObject = CreateCollectionFromList(ev, fPart, containerToken, whichProperty);
- }
- else
- {
- if (containerClass == cPart)
- {
- FW_MPartScriptable* part = GetDefaultContainer();
- acquiredObject = part->AcquireObjectContainedInPart(ev, desiredClass, form, selectionData);
- }
- else
- {
- FW_MScriptable* containerObject;
-
- if (containerToken.IsNullDescriptor())
- containerObject = GetDefaultContainer();
- else
- containerObject = ::FW_ExtractScriptableFromDesc(containerToken);
-
- acquiredObject = containerObject->AcquireContainedObject(ev, fPart, desiredClass, form, selectionData);
- }
-
- }
-
- if (acquiredObject != NULL)
- ::FW_InsertScriptableIntoDesc(acquiredObject, containedObjectToken);
- else
- FW_Failure(errAEEventNotHandled);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallCompareProc
- //---------------------------------------------------------------------------------------
-
- void FW_CSemanticInterface::CallCompareProc(Environment* ev,
- ODDescType oper,
- ODOSLToken* obj1,
- ODOSLToken* obj2,
- ODBoolean* result)
- {
- FW_CDesc desc1(GetDescFromToken(ev, obj1));
- FW_CDesc desc2(GetDescFromToken(ev, obj2));
-
- if (desc1.DescriptorType() == FW_kSemanticObjectTokenType)
- {
- FW_MScriptable* semanticObject = ::FW_ExtractScriptableFromDesc(desc1);
- *result = semanticObject->CompareScriptableObjects(ev, fPart, oper, desc2);
- }
- else
- FW_Failure(errAEEventNotHandled);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallCountProc
- //---------------------------------------------------------------------------------------
- void FW_CSemanticInterface::CallCountProc(Environment* ev,
- ODDescType desiredClass,
- ODDescType containerClass,
- ODOSLToken* container,
- ODSLong* result)
- {
- FW_CDesc containerToken(GetDescFromToken(ev, container));
-
- long elementCount = 0;
-
- if (containerClass == cPart)
- {
- elementCount = GetDefaultContainer()->CountElementsInPart(ev, desiredClass);
- }
- else
- {
- FW_MScriptable* containerObject = NULL;
-
- if (containerToken.IsNullDescriptor())
- containerObject = GetDefaultContainer();
- else
- containerObject = ::FW_ExtractScriptableFromDesc(containerToken);
-
- elementCount = containerObject->CountElements(ev, fPart, desiredClass);
- }
-
- *result = elementCount;
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallDisposeTokenProc
- //---------------------------------------------------------------------------------------
- void FW_CSemanticInterface::CallDisposeTokenProc(Environment* ev, ODOSLToken* unneededToken)
- {
- FW_CDesc token(GetDescFromToken(ev, unneededToken));
-
- if (token.DescriptorType() == FW_kSemanticObjectTokenType)
- {
- FW_MScriptable* scriptableObject = ::FW_ExtractScriptableFromDesc(token);
- scriptableObject->ReleaseScriptable();
- token.Clear();
- }
- else
- FW_Failure(errAEEventNotHandled);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallGetErrDescProc
- //---------------------------------------------------------------------------------------
- void FW_CSemanticInterface::CallGetErrDescProc(Environment* ev, ODDesc** errDesc)
- {
- FW_UNUSED(ev);
- FW_UNUSED(errDesc);
- FW_Failure(errAEEventNotHandled);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallGetMarkTokenProc
- //---------------------------------------------------------------------------------------
- void FW_CSemanticInterface::CallGetMarkTokenProc(Environment* ev,
- ODOSLToken* dContainerToken,
- ODDescType containerClass,
- ODOSLToken* result)
- {
- FW_UNUSED(dContainerToken);
- FW_UNUSED(containerClass);
-
- // FW_DebugIdentifyPart(ev, fPart->GetLastActiveFrame(ev), FW_kRGBBlue);
-
- FW_CDesc collectionToken(GetDescFromToken(ev, result));
-
- FW_CAcquiredScriptable collection = FW_NEW(FW_CScriptableCollection, ());
- ::FW_InsertScriptableIntoDesc(collection, collectionToken);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallMarkProc
- //---------------------------------------------------------------------------------------
- void FW_CSemanticInterface::CallMarkProc(Environment* ev,
- ODOSLToken* objectToMarkToken,
- ODOSLToken* markingListToken,
- ODSLong index)
- {
- FW_UNUSED(index);
-
- // FW_DebugIdentifyPart(ev, fPart->GetLastActiveFrame(ev), FW_kRGBRed);
-
- FW_CDesc objectToMarkDesc(GetDescFromToken(ev, objectToMarkToken));
- FW_CDesc markingListDesc(GetDescFromToken(ev, markingListToken));
-
- FW_MScriptable* objectToMark = ::FW_ExtractScriptableFromDesc(objectToMarkDesc);
- FW_CScriptableCollection* collection =
- FW_DYNAMIC_CAST(FW_CScriptableCollection, ::FW_ExtractScriptableFromDesc(markingListDesc));
-
- collection->Add(objectToMark);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CallAdjustMarksProc
- //---------------------------------------------------------------------------------------
- void FW_CSemanticInterface::CallAdjustMarksProc(Environment* ev,
- ODSLong newStart,
- ODSLong newStop,
- ODOSLToken* markToken)
- {
- // FW_DebugIdentifyPart(ev, fPart->GetLastActiveFrame(ev), FW_kRGBGreen);
-
- FW_CDesc markingListDesc(GetDescFromToken(ev, markToken));
- FW_CScriptableCollection* collection =
- FW_DYNAMIC_CAST(FW_CScriptableCollection, ::FW_ExtractScriptableFromDesc(markingListDesc));
-
- collection->AdjustMarks(ev, newStart, newStop);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::GetOSLSupportFlags
- //---------------------------------------------------------------------------------------
-
- ODSShort FW_CSemanticInterface::GetOSLSupportFlags(Environment* ev)
- {
- FW_UNUSED(ev);
- return fOSLFlags;
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::SetOSLSupportFlags
- //---------------------------------------------------------------------------------------
-
- void FW_CSemanticInterface::SetOSLSupportFlags(Environment* ev, ODSShort flags)
- {
- fOSLFlags = flags;
-
- FW_OSemanticInterface* semInt = AcquireSOMInterface(ev);
- if (semInt)
- {
- semInt->SetOSLSupportFlags(ev, flags);
- semInt->Release(ev);
- }
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::UsingPredispatchProc
- //---------------------------------------------------------------------------------------
-
- void FW_CSemanticInterface::UsingPredispatchProc(Environment* ev, ODBoolean usingNotUsing)
- {
- fUsingPredispatchProc = usingNotUsing;
-
- ODSemanticInterface* semInt = AcquireSOMInterface(ev);
- if (semInt)
- {
- semInt->UsingPredispatchProc(ev, usingNotUsing);
- semInt->Release(ev);
- }
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::CreateCollectionFromList
- //---------------------------------------------------------------------------------------
-
- FW_MScriptable* FW_CSemanticInterface::CreateCollectionFromList(Environment* ev,
- FW_CPart* part,
- const FW_CDesc& objectList,
- ODDescType whichProperty) const
- {
- FW_ASSERT(objectList.IsList());
-
- // FW_DebugIdentifyPart(ev, fPart->GetLastActiveFrame(ev), FW_kRGBPurple);
-
- FW_CScriptableCollection* collection = FW_NEW(FW_CScriptableCollection, ());
-
- FW_CDesc currentODToken;
- FW_CDesc currentToken;
- long itemsInList = objectList.GetItemCount();
-
- for (long index = 1; index <= itemsInList; index++)
- {
- currentODToken.Clear();
- currentToken.Clear();
-
- objectList.GetDescFromList(index, currentODToken);
- currentToken = GetDescFromToken(ev, currentODToken);
-
- FW_MScriptable* semObj = ::FW_ExtractScriptableFromDesc(currentToken);
-
- if (whichProperty != keyNoKey)
- {
- FW_CPropertyDesignator* propDesignator;
-
- propDesignator = FW_NEW(FW_CPropertyDesignator, (part, semObj, whichProperty));
- collection->Add(propDesignator);
- }
- else
- collection->Add(semObj);
- }
- return collection;
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::GetDescFromToken
- //---------------------------------------------------------------------------------------
-
- ODDesc* FW_CSemanticInterface::GetDescFromToken(Environment* ev,
- ODOSLToken* token) const
- {
- ODNameResolver* nameResolver = FW_CSession::GetNameResolver(ev);
- return (nameResolver->IsODToken(ev, token) ? nameResolver->GetUserToken(ev, token) : token);
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::AcquireTargetObject
- //---------------------------------------------------------------------------------------
-
- FW_MScriptable* FW_CSemanticInterface::AcquireTargetObject(Environment* ev,
- FW_CAppleEvent& event)
- {
- FW_CDesc targetObjectDesc;
- FW_MScriptable* result = NULL;
-
- if (event.HasDataKey(keyDirectObject))
- {
- FW_CDesc directObjectToken;
-
- event.GetDataByDesc(directObjectToken, keyDirectObject);
- result = AcquireScriptableFromToken(ev, directObjectToken);
- }
- else if (event.HasAttribute(keySubjectAttr))
- {
- FW_CDesc subjectDesc;
- event.GetSubject(subjectDesc);
- Resolve(ev, subjectDesc, targetObjectDesc);
-
- FW_TRY
- {
- result = AcquireScriptableFromToken(ev, targetObjectDesc);
- }
- FW_CATCH_BEGIN
- FW_CATCH_EVERYTHING()
- {
- FW_CSession::GetNameResolver(ev)->DisposeToken(ev, targetObjectDesc);
- FW_THROW_SAME();
- }
- FW_CATCH_END
-
- FW_CSession::GetNameResolver(ev)->DisposeToken(ev, targetObjectDesc);
- }
- else
- FW_Failure(errAEEventNotHandled);
-
- return result;
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::Resolve
- //---------------------------------------------------------------------------------------
-
- void FW_CSemanticInterface::Resolve(Environment* ev,
- const FW_CDesc& objectSpec,
- FW_CDesc& odfToken,
- ODPart* contextPart) const
- {
- if (objectSpec.IsNullDescriptor())
- {
- odfToken.Clear();
- }
- else
- {
- ODNameResolver* nameResolver = FW_CSession::GetNameResolver(ev);
-
- nameResolver->Resolve(ev, objectSpec, odfToken, contextPart);
- odfToken.SetOwnsODData(FALSE);
- }
- }
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::AcquireScriptableFromToken
- //---------------------------------------------------------------------------------------
-
- FW_MScriptable* FW_CSemanticInterface::AcquireScriptableFromToken(Environment* ev,
- const FW_CDesc& odToken) const
- {
- FW_MScriptable* scriptable = NULL;
- FW_CDesc odfToken = GetDescFromToken(ev, odToken);
- ODDescType tokenType = odfToken.DescriptorType();
- FW_Boolean contextIsMyPart = false;
-
- // The tokenType == kODStandardPartTokenType is necessary to work around
- // two bugs in OpenDoc 1.1 and earlier (possibly later) releases. When
- // an apple event without a direct object is received by OpenDoc, the subject
- // attribute is resolved, and the event is dispatched based on the resolved
- // subject attribute. Because of a bug in OpenDoc, the event might first
- // be dispatched to the wrong part - sometimes the root, sometimes the
- // part that contains the actual target. Whether it goes to the root or
- // the containing part is a function of the specifier form used.
- // The code below attempts to detect the case where an event has been
- // mis-dispatched. We look for a standard ODPartToken and, if we find
- // one, we call GetContextFromToke.
- // There is a second bug in OpenDoc that causes the context to usually
- // be wrong. Consequently, we can't really work around the first bug.
- // When the contextPart is NULL, this is an indication that the event
- // was first misdispatched to the shell, and is now being dispatched
- // to us. We treat this as an event targeted at the part. When the
- // contextPart is not NULL, we compare it against our part. Because of
- // the first bug, contextPart will usually be our container when it
- // should be us...we can't reliably detect this case, so we treat it
- // as if it's not our event (we might actually be the container getting
- // the event that is really targeted at something we contain).
-
- // What this means: Events without direct objects do not work and are
- // not reliable in the current version of OpenDoc. Sometimes they will
- // make it into the part and get handled, sometimes they won't.
- if (tokenType == kODStandardPartTokenType)
- {
- ODPart* contextPart;
- ODFrame* contextFrame;
- FW_CSession::GetNameResolver(ev)->GetContextFromToken(ev, odToken, &contextPart, &contextFrame);
-
- if (!contextPart || (contextPart == fPart->GetODPart(ev)))
- contextIsMyPart = true;
- }
-
- if (odfToken.IsNullDescriptor() || contextIsMyPart)
- {
- scriptable = GetDefaultContainer();
- scriptable->AcquireScriptable();
- }
- else if (tokenType == FW_kSemanticObjectTokenType)
- {
- scriptable = ::FW_ExtractScriptableFromDesc(odfToken);
- scriptable->AcquireScriptable();
- }
- else if (odfToken.IsList())
- {
- scriptable = CreateCollectionFromList(ev, fPart, odfToken);
- }
- else
- FW_Failure(errAEEventNotHandled);
-
- return scriptable;
- }
-
- //---------------------------------------------------------------------------------------
- // FW_DebugIdentifyPart:
- // This utility method is for debugging semantic event handling in nested parts.
- // A circle of the specified color will be briefly displayed in the top left
- // corner of the first facet of the specified frame. This method does not attempt
- // to redraw or invalidate the content area obscured by the circle.
- //
- // Note: This method may not be a permanent part of the ODF API.
- //---------------------------------------------------------------------------------------
-
- void FW_DebugIdentifyPart(Environment* ev, FW_CFrame* frame, const FW_CColor& color)
- {
- if (frame)
- {
- FW_CFrameFacetIterator iter(ev, frame);
- FW_CViewContext vc(ev, frame, iter.First(ev), NULL);
- FW_CRect rect(FW_kFixed0, FW_kFixed0, FW_IntToFixed(10), FW_IntToFixed(10));
-
- FW_CInk ink;
- ink.SetForeColor(color);
- ink.SetTransferMode(FW_kCopy);
- FW_COvalShape::RenderOval(vc, rect, FW_kFill, ink);
- FW_WaitFor(20);
- ink.SetTransferMode(FW_kErase);
- FW_COvalShape::RenderOval(vc, rect, FW_kFill, ink);
- }
- }
-
- //========================================================================================
- // End Callbacks
- //========================================================================================
-
- //---------------------------------------------------------------------------------------
- // FW_CSemanticInterface::PrivCreate
- //---------------------------------------------------------------------------------------
-
- ODExtension* FW_CSemanticInterface::PrivCreate(Environment* ev, FW_CPart* part, const char* name, void* refCon)
- {
- return (part->GetSemanticInterface(ev)->CreateSOMInterface(ev, part, name, refCon));
- }
-